module.exports = options => {
  return async (ctx, next) => {
    const userModel = require("../model/admin/User");
    const assert = require("http-assert");
    // const token = String(ctx.request.header.authorization || "").split(" ").pop();
    // assert(token, 422, "缺少token");
    // var decoded = require("jsonwebtoken").verify(token, 'azhen');
    // assert(decoded, 422, "token错误");
    // const res = await userModel.findById(decoded.id);
    // console.log(res)
    // assert(res, 422, "用户不存在");
    await next();
  }
}